package cn.fivestars.springcloud.stream.controller;

import cn.fivestars.springcloud.commons.entities.CommonResult;
import cn.fivestars.springcloud.stream.service.IMessageProvider;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author liangchenzhou1024@163.com
 * @date 2021/3/14
 */
@RestController
public class SendMessageController {

    @Resource
    private IMessageProvider messageProvider;

    @GetMapping("/send")
    public CommonResult<String> sendMessage() {
        String message = messageProvider.send();
        return CommonResult.success(message);
    }
}
